Though processors on computer systems operate at high speeds, they may perform inefficiently due to delays, such as those that occur while waiting to access memory. Fast cache memory is one way to reduce these delays, but a cache miss, which occurs when a desired block of memory is not in the cache and must be retrieved from external caches or memory, causes CPU idling, resulting in execution delay.
One technique for reducing processor idling is the use of hardware multithreading to achieve processor execution during otherwise idle cycles. In a multithreaded processor, two or more threads of execution may concurrently exist on the processor. Hardware multithreading may employ the replication of registers for each thread in order to minimize the overhead of switching between threads. This technique is called “vertical multithreading.”
In vertical multithreading, a group of two or more threads may each have their own registers, while functional units, such as an execution unit, are shared. Threads are alternately selected to execute. In course-grained multithreading, a thread may use a functional unit until it stalls, such as upon a memory access. At that point, another thread is selected to execute. A context switch from the first thread to the second thread may involve saving the useful states of the first thread and assigning new states to the second thread. When the first thread restarts after stalling, the saved states are returned and the first thread proceeds. In fine grained multithreading, a thread may be selected to execute at a cycle boundary. In horizontal multithreading, a group of threads share a pipeline, and different threads may be scheduled on different functional units of the pipeline at the same time. Multiple threads may execute simultaneously, as long as there is no conflict for a shared resource.
In a processor configured for chip multiprocessing (CMT), two or more cores exist on the same processor chip. While each core may have a first level cache, the cores may share a second level cache. Threads from a first core execute independently of threads from a second core, though they may interact through shared memory, including the second level cache. A processor may combine chip multiprocessing and hardware multithreading, having two or more multithreaded cores on a single processor.
Computer system processors consume a significant amount of power. High power consumption can generate large amounts of heat. Mechanisms for dissipating heat can require additional power consumption. The consumption of power, as well as the generation and dissipation of heat can adversely affect computer systems in a number of ways, such as reduction of battery life, wear on components, operational costs, and the like. Increases in complexity and number of components in processors tend to exacerbate problems of power consumption and management of power usage. In multithreaded computer systems, problems related to power consumption may be further exacerbated, due to the maximized use of processors and components.
Generally, it is desirable to employ improved techniques for managing power usage in a computer system, and in particular a multithreaded computer system. Therefore, it is with respect to these considerations and others that the present invention has been made.